<template>
  <div class="search">
    <a-timeline>
      <a-timeline-item>卖家已发货 2015-09-01</a-timeline-item>
      <a-timeline-item>已到达深圳 2015-09-01</a-timeline-item>
      <a-timeline-item>正在配送中 2015-09-01</a-timeline-item>
      <a-timeline-item>已签收 2015-09-01</a-timeline-item>
    </a-timeline>
  </div>
</template>

<script>
  import { axios } from '@/utils/request'
  export default {
    name: 'OrderLogisticsProgress',
    props: {},
    data() {
      return {
        isAdd: true,
        loaded: false,

        formItem: this.getFormItem()
      }
    },
    methods: {
      getFormItem() {
        return {}
      },
      setData(data) {
        if (data && data.orderId) {
          this.http.get(this, {
            url: this.api.orderLogistics.get,
            params: {
              orderId: data.orderId
            },
            success: function(me, data) {

              axios.get('https://www.kuaidi100.com/autonumber/autoComNum?resultv2=1&text='+data.logisticsNo)
                .then(function (response) {
                  console.log(response);
                })
                .catch(function (error) {
                  console.log(error);
                });


            }
          })
          this.isAdd = false
        } else {
          this.formItem = this.getFormItem()
          this.loaded = true
        }
      },

      handleSubmit(callback) {
        this.$refs.form.submit({ orderId: this.formItem.orderId }, callback)
      }
    },
    created() {

    },
    components: {}
  }
</script>

<style scoped lang="less" rel="stylesheet/less">

</style>
